package com.tlkj.common.curd.example.controller;

import com.tlkj.common.curd.example.entity.TenantInfo;
import com.tlkj.common.curd.example.service.TenantInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author flyong86
 */
@RestController
@RequestMapping("tenant")
public class TenantInfoController {

    @Autowired
    private TenantInfoService tenantInfoService;

    @GetMapping("/detail/{id}")
    public TenantInfo detail(@PathVariable Long id) {
        return tenantInfoService.findById(id);
    }
}
